<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/10/13
  Time: 11:17
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>个人中心界面</title>
    <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
    <title>用户管理界面</title>
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="/css/readeradmin.css">
    <link rel="stylesheet" href="/css/booksearch.css">
    <link rel="stylesheet" href="/css/index.css">
    <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
    <style type="text/css">
        .fengye{
            border: 1px solid;
            display: inline;
            padding: 8px 16px;
        }

        span{
            color: aliceblue;
        }
        table{

            width: 980px;
        }


        td{

            overflow: hidden;

        }

        #fff{
            float: left;
            margin-left: 50px;
            width:693px;
            height: 44px;
            border: 1px solid black;
            position: relative;
        }

        #sss {
            float: left;
            height: 41px;
            width: 100px;
            text-align: center;
        }

        #ttt {
            float: left;
            width: 510px;
            height: 41px;
            padding-left: 10px;
            line-height: 41px;
        }

        #iii {
            /* float: right; */
            position: absolute;
            top: 0;
            left: 611px;
            width: 80px;
            height: 41px;
            background-color: #2d241d;
            font-size: 16px;
            color: #fff;
        }
        .tupian img {
            float: right;
            width: 980px;
            height: 465px;
        }

        .minyan {
            float: left;
            width: 100%;
            height: 163px;
            margin-top: 12px;
            background-color: green;
            text-align: center;
            font-size: 20px;
            font-weight: bold;
            line-height: 163px;
            color: #fff;
            background: rgba(0, 0, 0, 0.7);
        }
        .hide{
            display: none;
        }
        .c1{
            position: fixed;
            top:0;
            bottom: 0;
            left:0;
            right: 0;
            background: rgba(0,0,0,.5);
            z-index: 2;
        }
        .c2{
            background-color: white;
            position: fixed;
            width: 400px;
            height: 300px;
            top:50%;
            left: 50%;
            z-index: 3;
            margin-top: -150px;
            margin-left: -200px;
        }
        #modal p {
            margin-left:80px;
        }
        #add,#update{
            text-align: center;
        }
        #updateTable{
            display: none;
        }

        <%--    <style type="text/css">--%>
<%--        li{--%>
<%--            border: 1px solid;--%>
<%--            display: inline;--%>
<%--            padding: 8px 16px;--%>
<%--        }--%>

<%--        #update{--%>
<%--            text-align: center;--%>
<%--        }--%>

<%--        h2 {text-align:center}--%>



    </style>
</head>
<body>

<%
    String contextPath = request.getSession().getServletContext().getContextPath();
%>
<%--<a href="<%=contextPath%>/admin/">退出</a><br><br>--%>


<%--<button onclick="javascrtpt:window.location.href='<%=contextPath%>/admin/adminPCenter/zhuxiao/'">注销</button>--%>
<section class="shortcut">
    <div class="w">
        <div class="fl">
            <ul>
                <li>图书管理系统！&nbsp;</li>
                <li>
                    <a href="index.html">请登录</a> &nbsp;
                    <a href="#" class="style-red">个人信息表</a>
                </li>
            </ul>
        </div>
        <div class="fr">
            <ul>
                <li class="arrow-icon">我的消息</li>
                <li>|</li>
                <li class="arrow-icon"> <a href="<%=contextPath%>/admin/">退出</a></li>
            </ul>
        </div>
    </div>
</section>
<!-- 头部模块 -->
<header class="header w">
    <!-- logo -->
    <div class="logo">
        <h1>
            <a href="index.html" title="图书管理系统">人类进步的阶梯</a>
        </h1>
    </div>



</header>
<nav class="nav">
    <div class="w">
        <div class="dropdown">
            <div class="dt"> <a href="aindex.html">首页</a> </div>
            <div class="dd">
                <ul>
                    <li><a href="<%=contextPath%>/admin/User/">用户管理</a> </li>
                    <li><a href="<%=contextPath%>/admin/book/">图书管理</a> </li>
                    <li><a href="<%=contextPath%>/admin/borrow/">图书借阅管理</a> </li>

                    <li><a href="<%=contextPath%>/admin/inform/all/">通知</a></li>
                    <li><a href="<%=contextPath%>/admin/adminPCenter/">个人中心</a> </li>

                </ul>
            </div>
        </div>
    </div>
    </nav>


<%--<form id="personTable" name="personTable" border="1px">--%>
<%--        <label>用户账号:</label><input type="text" name="zhanghao" id="zhanghao"><br>--%>
<%--        <label>用户名：</label><input type="text" name="username" id="username"><br>--%>
<%--        <label>密码:</label><input type="password" name="password" id="password"><br>--%>
<%--        <label>手机：</label><input type="text" name="phone" id="phone"><br>--%>
<%--        <label>邮箱：</label><input type="text" name="email" id="email"><br><br>--%>
<%--&lt;%&ndash;        <p>&ndash;%&gt;--%>
<%--&lt;%&ndash;            <input type="button" value="确定" id="submit">&ndash;%&gt;--%>
<%--&lt;%&ndash;            <input type="button" value="取消" onclick="Hide()">&ndash;%&gt;--%>
<%--&lt;%&ndash;            <input type="reset" value="重置" >&ndash;%&gt;--%>
<%--&lt;%&ndash;        </p>&ndash;%&gt;--%>
<%--    </form>--%>
<%--<br><br>--%>
<div class="w">
    <div class="main">
        <div class="personTable" id="personTable">
            <form id="update" method="post">
                <%--        <h2>修改个人信息</h2>--%>
                <label>用户名：</label><input type="text" name="adminName" class="adminName" value=${admin.adminName}><br>
                <label>用户账号:</label><input type="text" name="azhanghao" readonly="true" class="azhanghao" value=${admin.azhanghao}><br>

                <label>密码:</label><input type="password" name="apassword" class="apassword" value=${admin.apassword}><br>

                <input id="submit" type="button" value="确定修改"> <input type="reset" value="重置" >
                    <a href="<%=contextPath%>/admin/adminPCenter/zhuxiao/">注销</a>
                <%--    </form>--%>
            </form>
<%--            <button onclick="javascrtpt:window.location.href='<%=contextPath%>/admin/adminPCenter/zhuxiao/'">注销</button>--%>
        </div>
    </div>
</div>
<div class="w ">
    <div class="minyan">

        好好建设图书馆，全心全意为读者服务！

    </div>
</div>
</body>
<%--<div class="personTable" id="personTable">--%>
<%--    <form id="update" method="post">--%>
<%--        &lt;%&ndash;        <h2>修改个人信息</h2>&ndash;%&gt;--%>
<%--        <label>用户名：</label><input type="text" name="adminName" class="adminName" value=${admin.adminName}><br>--%>
<%--        <label>用户账号:</label><input type="text" name="azhanghao" readonly="true" class="azhanghao" value=${admin.azhanghao}><br>--%>

<%--        <label>密码:</label><input type="password" name="apassword" class="apassword" value=${admin.apassword}><br>--%>

<%--        <input id="submit" type="button" value="确定修改"> <input type="reset" value="重置" >--%>
<%--        &lt;%&ndash;    </form>&ndash;%&gt;--%>
<%--    </form>--%>
<%--</div>--%>


<%--<div id="modal" class="c2 hide">--%>
<%--    <form id="cancle">--%>
<%--        <h1 id="title" name="title">注销</h1>--%>

<%--            <input type="button" value="确定" id="submit1">--%>
<%--            <input type="button" value="取消" onclick="Hide()">--%>

<%--    </form>--%>

<%--</div>--%>






<script>



    $(function (){
        $("#submit").click(function (){
            var adminName = $(".adminName").val();
            var azhanghao = $(".azhanghao").val();

            var apassword = $(".apassword").val();


            if( azhanghao=="" || apassword=="" ){
                alert("用户信息填写不完整");
            }else{
                $.ajax({
                    type:"post",
                    url:"<%=contextPath%>/admin/adminPCenter/update",
                    data:{

                        "azhanghao":azhanghao,
                        "adminName":adminName,
                        "apassword":apassword,
                    },
                    success:function (msg){
                        if(msg==true){
                            alert("修改成功！")
                        }else if(msg==false){
                            alert("修改失败")
                        }
                    }
                })
            }


        })
    })


    <%--$(function (){--%>
    <%--    $("#submit1").click(function (){--%>
    <%--        var isreturn = $(".isreturn").val();--%>


    <%--        if(isreturn=" "){--%>
    <%--            alert("请归还图书后，再注销");--%>
    <%--        }else{--%>
    <%--            $.ajax({--%>
    <%--                type:"post",--%>
    <%--                url:"<%=contextPath%>/user/personCenter/cancle",--%>
    <%--                data:{--%>

    <%--                    "isreturn":isreturn,--%>
    <%--                },--%>
    <%--                success:function (msg){--%>
    <%--                    if(msg==true){--%>
    <%--                        alert("注销成功！")--%>
    <%--                    }else if(msg==false){--%>
    <%--                        alert("注销失败")--%>
    <%--                    }--%>
    <%--                }--%>
    <%--            })--%>
    <%--        }--%>


    <%--    })--%>
    <%--})--%>


</script>



</html>

